#include <stdio.h>
void findMaxAndMix(int arr[],int len,int* pMax,int* pMin){
    int max=arr[0];
    int min=arr[0];
    for(int i=1;i<len;i++){
        if (max<arr[i]){
            max=arr[i];
        }
        if (min>arr[i]){
            min=arr[i];
        }
    }
    *pMax=max;
    *pMin=min;
}
int main(){
    int arr[]={23,45,12,56,134,56,98};
    int max=0;
    int min=0;
    findMaxAndMix(arr,sizeof(arr)/sizeof(arr[0]),&max,&min);
    printf("max=%d\nmin=%d\n",max,min);
}